<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 
        函数在对象中作为方法的语法(三种)
     -->
    <script>
        var obj = {
            name:"zheng",
            sayName(){
                console.log(this.name);
            },
            sayAge:()=>{
                console.log(18);
            },
            saySkill:function(){
                console.log("javascript");
            }
        }
    </script>
</body>
</html>